package org.finmanager.core;

import javax.swing.*;
import java.awt.event.ActionListener;

/**
 * Created by Kelvin on 22/3/2014.
 * <p/>
 * Popup menu for deleting a category
 */

//Inside the "cat" window
//users are able to right click in order to delete a category using this pop up menu
public class CategoryPopUpMenu extends JPopupMenu {
	private JMenuItem deleteMenuItem;

	public CategoryPopUpMenu() {
		super();

		deleteMenuItem = new JMenuItem("Delete");
		deleteMenuItem.setActionCommand(CategoryManagerController.DELETE_CATEGORY);

		add(deleteMenuItem);
	}

	public void addMenuItemListener(ActionListener listener) {
		deleteMenuItem.addActionListener(listener);
	}
}
